package cn.k7g.alloy.core.objectmapper;

import cn.k7g.alloy.model.SortOrder;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;

import java.io.IOException;

/**
 * 返回序列化
 * @author victor-wu
 * @date 2021/5/19 下午6:37
 */
public class SortOrderDeserializer extends JsonDeserializer<SortOrder> {
    @Override
    public SortOrder deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {
        return new SortOrder(p.getLongValue());
    }
}
